package com.scalar.chiptrack.operations.dataentry.rmaReceive.forms;

import com.scalar.chiptrack.ChipTrackActionForm;
import com.scalar.chiptrack.operations.dataentry.LotDetails;
import com.scalar.chiptrack.utils.AutoGrowingArrayList;
import com.scalar.chiptrack.utils.StringUtils;
import com.scalar.chiptrack.utils.DateUtil;

import java.util.ArrayList;
import java.util.Date;
import java.util.Calendar;

import org.apache.struts.action.ActionMapping;

import javax.servlet.http.HttpServletRequest;

/**
 * User: ChandraSekhar
 * Date: Aug 22, 2008
 * Time: 1:56:49 PM
 */
public class RMAReceiveForm extends ChipTrackActionForm
{

    private int customerId    = -1;
    private int locationId    = -1;
    private int rmaReceiveId      = -1;
    private String rmaReceiveNo = null;
    private int processStepId = -1;
    private String fromDate  = null;
    private String toDate  = null;
    private String vendorName  = null;

    ArrayList rmaReceiveLotsList = new AutoGrowingArrayList(LotDetails.class);
    
    public RMAReceiveForm()
    {
        fromDate = DateUtil.getPreviousDate(15);
        toDate = DateUtil.getCurrentDate();
    }
    public int getCustomerId() {
        return customerId;
    }

    public void setCustomerId(int customerId) {
        this.customerId = customerId;
    }

    public int getLocationId() {
        return locationId;
    }

    public void setLocationId(int locationId) {
        this.locationId = locationId;
    }


    public int getRmaReceiveId() {
        return rmaReceiveId;
    }

    public void setRmaReceiveId(int rmaReceiveId) {
        this.rmaReceiveId = rmaReceiveId;
    }

    public String getRmaReceiveNo() {
        return rmaReceiveNo;
    }

    public void setRmaReceiveNo(String rmaReceiveNo) {
        this.rmaReceiveNo = rmaReceiveNo;
    }

    public ArrayList getRmaReceiveLotsList() {
        return rmaReceiveLotsList;
    }

    public void setRmaReceiveLotsList(ArrayList rmaReceiveLotsList) {
        this.rmaReceiveLotsList = rmaReceiveLotsList;
    }

    public int getProcessStepId() {
        return processStepId;
    }

    public void setProcessStepId(int processStepId) {
        this.processStepId = processStepId;
    }

    public String getFromDate() {
        return fromDate;
    }

    public void setFromDate(String fromDate) {
        this.fromDate = fromDate;
    }

    public String getToDate() {
        return toDate;
    }

    public void setToDate(String toDate) {
        this.toDate = toDate;
    }

    public String getVendorName() {
        return vendorName;
    }

    public void setVendorName(String vendorName) {
        this.vendorName = vendorName;
    }

    public void reset(ActionMapping actionMapping, HttpServletRequest httpServletRequest)
    {
        if( rmaReceiveLotsList != null )
        {
            rmaReceiveNo = null;

        }
    }
}
